<script type="text/javascript" src="http://www.appelsiini.net/download/jquery.jeditable.mini.js" ></script>

<form method="post">
<article class="module width_full">
    <header><h3>{#title#}</h3></header>
    <table width="100%" cellpadding="3" cellspacing="1">
            <tbody>
                    <tr>
                            <th align="center" class="header"><a href="index.php?mod=options">{#main#}</a></th>
                            <th align="center" class="header"><a href="index.php?mod=options&page=modules">{#modules#}</a></th>
                            <th align="center" class="header"><a href="index.php?mod=options&page=misc">{#misc#}</a></th>
                            <th align="center" class="header"><a href="index.php?mod=options&page=access">{#access#}</a></th>
                    </tr>
            </tbody>
    </table>

        <table width="100%" cellpadding="3" cellspacing="1">
                <tbody>
                        <tr>
                                <th align="left" colspan="5" class="header">{#misc#}</th>
                        </tr>
                        <tr>
                                <th align="left" class="header">{#mod_access#}</th>
								<th align="left" class="header">{#mod_title#}</th>
                                <th align="left" class="header">{#actions#}</th>
                        </tr>
						<tr >
                                <td class="body">
									<select name="access">
										{$access}
									</select>
								</td>
								<td class="body"><input type="text" name="title" /></td>
                                <td class="body" align="right"><input type="submit" name="submit"  value="{#submit#}" /></td>
                        </tr>
                        {foreach from=$value item=item}
						{literal}
							<script type="text/javascript">
								$(function() {
									$(".inv_button_{/literal}{$item.id}{literal}").click(function() {
										var id 					= '{/literal}{$item.id}{literal}';
										var dataString	= 'navi='+ id;
										var parent = $(this).parent();
									$.ajax({
										type: "POST",
										url: "_javascript/ajax_livedit.php",
										data: dataString,
										cache: false,
										success: function()
											{
												$("#maininv_{/literal}{$item.id}{literal}").fadeOut('slow', function() {$("#maininv_{/literal}{$item.id}{literal}").remove();});
											}
									});
									return false;
									});
								});
							</script>
						   <script type="text/javascript">
							$(document).ready(function() {
								$('.access_{/literal}{$item.id}{literal}').editable('_javascript/ajax_livedit.php?action=navi_access&id={/literal}{$item.id}{literal}', {
									indicator : '{/literal}{#saving#}{literal}',
										height: '20px',
										data   : {/literal}{$json_rights}{literal},
										type   : "select",
										submit : "OK",
										style  : "inline"
								});
								$('.title_{/literal}{$item.id}{literal}').editable('_javascript/ajax_livedit.php?action=navi_title&id={/literal}{$item.id}{literal}', {
									indicator : '{/literal}{#saving#}{literal}',
										height: '20px'
								});

							});
						  </script>
					  {/literal}
                        <tr id="maininv_{$item.id}">
                                <td style="cursor:pointer;" class="body access_{$item.id}">{$item.access}</td>
								<td style="cursor:pointer;" class="body title_{$item.id}">{$item.title}</td>
                                <td class="body" align="right"><a href="" class="inv_button_{$item.id}"><img src="_images/icons/cross.png" alt="" /></a></td>
                        </tr>
                        {/foreach}
                </tbody>
        </table>
</article>
</form>
<div class="modal" id="addet">
        <h3>{#addet#}</h3>
	<p>{#success_addet#}</p>
</div>